using System;
using System.ComponentModel;

using DevExpress.Xpo;
using DevExpress.Data.Filtering;

using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;

namespace Positive.Module.Common.Location
{
    [DefaultClassOptions]
    public class Address : BaseObject
    {
        public Address(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here or place it only when the IsLoading property is false:
            // if (!IsLoading){
            //    It is now OK to place your initialization code here.
            // }
            // or as an alternative, move your initialization code into the AfterConstruction method.
        }
        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place here your initialization code.
        }

        private string _street;
        private City _city;
        private Country _country;
        private CountryState _countryState;
        private bool _isActive;
        private string _fullAddress;

      


        public string Street
        {
            get { return _street; }
            set {SetPropertyValue ("Street",ref _street ,value); }
        }
      

        public City City
        {
            get { return _city; }
            set {SetPropertyValue ("City",ref _city , value); }
        }
       
        public Country Country
        {
            get { return _country; }
            set {SetPropertyValue ("Country",ref _country ,value); }
        }
       

        public CountryState CountryState
        {
            get { return _countryState; }
            set {SetPropertyValue ("CountryState",ref _countryState , value); }
        }


        [Size (SizeAttribute.Unlimited)]
        public string FullAddress
        {
            get { return _fullAddress; }
            set { SetPropertyValue("FullAdress",ref  _fullAddress, value); }
        }


        public bool IsActive
        {
            get { return _isActive; }
            set { SetPropertyValue ("IsActive",ref _isActive , value); }
        }
       
    }

}
